<template>
<view class="page_ztc" >
	<view class="input_div">
		<image class="ss" src="https://wqq103910.oss-cn-hangzhou.aliyuncs.com/images/fuzhou/image/index/index_ss.png" mode=""></image>
		<input class="ss_text" placeholder="输入关键词" confirm-type="search" @confirm="toList"/>
		<view class="ss_type">
			<text @click="toList">搜索</text> 
		</view>
	</view>
	<!-- 轮播视频图 -->
	<view class="swiper_div">
		<swiper class="swiper" circular :indicator-dots="false" :autoplay="true" :interval="4000" :duration="500">
			<swiper-item v-for="(item,index) in swiperImg" :key="index" @click="toPage('zibenDetail')" >
				<view class="swiper-item" >
					<!-- :style="'background:'+ (index==0?'#f93':index==1?'#00ff33':'#15c1ff')" -->
					<image v-if="item.img" class="image" :src="item.img" mode="widthFix"></image>
				</view>
			</swiper-item>
		</swiper>
	</view>
	
	<view class="content_div" @click="toPage('zibenDetail')">
		<view class="c_item c_bg">
			<image class="image" src="~@/static/image/ztc_icon1.png" mode=""></image>
			<image class="ztc_bg" src="~@/static/image/ztc_bg1.png" mode=""></image>
			<view class="">产品</view>
		</view>
		<view class="c_item c_bg1">
			<image class="image" src="~@/static/image/ztc_icon2.png" mode=""></image>
			<image class="ztc_bg" src="~@/static/image/ztc_bg2.png" mode=""></image>
			<view class="">服务</view>
		</view>
	</view>
	<image @click="toPage('zibenDetail')" class="image2" src="~@/static/image/ztc_bg3.png" mode="widthFix"></image>
	
	<view class="fw_title">金融服务</view>
	<view class="fw_item" v-for="(item,index) in list" :key="index" @click="toPage('zibenDetail')">
		<view class="fw_image">
			<view class="fw_img_text">{{item.type}}</view>
			<image class="fw_image" src="~@/static/image/fw_item.png" mode="widthFix"></image>
		</view>
		<view class="fw_content">
			<view class="fw_name">{{item.name}}</view>
			<view class="fw_text">类型：{{item.type_t}}</view>
			<view class="fw_text">数量：{{item.num}}</view>
		</view>
	</view>
</view>
</template>

<script>
	import img1 from '~@/static/image/ztc.png'
	export default {
		data() {
			return {
				swiperImg:[{img:img1}],
				list:[
					{name:'汽车发展支持资金',type:'供',type_t:'产业基地',num:'10000万'},
					{name:'小微企业贷款',type:'供',type_t:'银行贷款',num:'1000万'},
					{name:'个人理赔保险',type:'供',type_t:'保险产品',num:'100万'},
				]
			}
		},
		methods: {
			toPage(url){
				uni.navigateTo({
					url: `/pages/${url}/${url}`
				})
			}
		}
	}
</script>

<style scoped lang="scss">
.page_ztc{
	padding: 0px 15px;
}
.input_div{
	width: 100%;
	height: 34px;
	opacity: 1;
	border-radius: 10px;
	background: #f6f6f6;
	margin: 10px auto 15px;
	display: flex;
	position: relative;
	align-items: center;
	.ss{
		position: relative;
		width: 16px;
		height: 16px;
		margin: 0 12px 0 12px;
	}
	.ss_text{
		font-size: 12px;
		color: #333;
		width: calc(100% - 140px);
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		&::-webkit-input-placeholder {
			color:  rgba(197, 197, 197, 1);
		}
	}
	.ss_type{
		position: absolute;
		right: 12px;
		color: rgba(0, 145, 255, 1);
		font-weight: 800;
		font-size: 12px;
		text-align: center;
		width: 70px;
		text{
			display: inline-block;
			width: 50px;
		}
		image{
			height: 12px;
			width: 12px;
			margin-left: 6px;
			position: relative;
			top: 2px;
		}
		&::before{
			position: absolute;
			content: ' ';
			height: 16px;
			width: 2px;
			background: #eee;
			left: -10px;
		}
	}
}
.swiper_div{
	width: 100%;
	height: 100px;
	border-radius: 12px;
	overflow: hidden;
	.swiper {
		height: 100%;
	}
	.swiper-item {
		display: block;
		height: 100%;
		text-align: center;
		.image{
			width: 100%;
		}
	}
}
.content_div{
	display: flex;
	justify-content: space-between;
	margin-top: 15px;
	.c_item{
		width: calc(50% - 6px);
		border-radius: 16px;
		box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.25);
		height: 90px;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 20px;
		position: relative;
		.image{
			width: 32px;
			height: 32px;
			margin-right: 20px;
		}
		.ztc_bg{
			position: absolute;
			right: 0;
			bottom: 0;
			width: 90%;
			height: 75%;
		}
	}
	.c_bg{
		background: #E3EFFC;
	}
	.c_bg1{
		background: #E6FFF4;
	}
}
.image2{
	margin: 25px 0;
	width: 100%;
	box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.25);
	border-radius: 10px;
}

.fw_title{
	font-size: 14px;
	font-weight: 500;
}
.fw_item{
	padding: 10px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 1);
	box-shadow: 0px 1px 10px 0px rgba(10, 71, 117, 0.1);
	margin-top: 12px;
	display: flex;
	overflow: hidden;
	position: relative;
	&::after{
		position: absolute;
		content: ' ';
		width: 14px;
		height: 14px;
		border-top: 1px solid #666;
		border-right: 1px solid #666;
		transform: rotate(45deg);
		
		right: 20px;
		top: 40px;
	}
	.fw_image{
		width: 110px;
		position: relative;
		border-radius: 10px;
		overflow: hidden;
		margin-right: 12px;
		.fw_img_text{
			position: absolute;
			z-index: 1;
			top: 0;
			left: 0;
			padding: 4px 6px;
			color: #fff;
			background: rgba(0, 145, 255, 0.8);
		}
	}
	.fw_content{
		.fw_name{
			font-size: 15px;
		}
		.fw_text{
			font-size: 14px;
			color: #888;
			margin-top: 8px;
		}
	}
}

</style>
